package com.woniuxy01;

/**
 * @author 作者
 * @create 2025-06-03 10:05
 */
public class CarFactory {
    public static Car createCar(String type){
        Car car = null;
        if("bmw".equals(type)){
            car=new Bmw();
        }else if("benz".equals(type)){
            car=new Benz();
        }
        return car;
    }
}
